package mr.zhang.service.impl;


import mr.zhang.dao.ProjectManagerDao;
import mr.zhang.pojo.model.TCensusProject;
import mr.zhang.pojo.model.TProject;
import mr.zhang.service.ProjectManagerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**  管理员对项目对各种修改 服务层
 * Created by jerry on 15/2/5.
 * E-mail:huaxinxc@me.com
 */
@Service("projectManagerService")
@Transactional
public class ProjectManagerServiceImpl implements ProjectManagerService {

   @Autowired
    private ProjectManagerDao projectManagerDao;

    public void setProjectManagerDao(ProjectManagerDao projectManagerDao) {
        this.projectManagerDao = projectManagerDao;
    }

    @Override
    public List<TCensusProject> getProjectList() {
        List<TCensusProject> list = projectManagerDao.getPojectList();
        return list;
    }


    /**
     * 添加项目项目
     *
     * @param tProject
     * @return
     */
    @Override
    public Boolean addProject(TProject tProject) {
        return projectManagerDao.addProject(tProject);
    }
}
